Repository navigation
Allow for user-defined function for evaluating detector efficiency - #96
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #96 +/- ##
==========================================
+ Coverage 87.90% 87.92% +0.01%
==========================================
Files 19 19
Lines 1596 1598 +2
==========================================
+ Hits 1403 1405 +2
Misses 193 193 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@SteSeg @veliki-filozof would you mind reviewing this so I can merge it and use the main branch for processing the flab runs? |
|
@cdunn314 Something about the changes you made to test_compass.py made it break after you added efficiency function kwargs. I looked into the failed CI run report and Copilot suggests that something about kwargs being expanded by ** when they are None makes it break. Could you please look into this and make a fix before I merge? |
|
@cdunn314 tests are now failing for another reason |
|
@veliki-filozof @RemDelaporteMathurin I fixed the test and now this is ready for a merge I think! |
Previously, libra-toolbox only allowed polynomial coefficients to be passed through SampleMeasurement.get_gamma_emitted() in order to evaluate the detector efficiency at a particular energy.
However, with this PR, the user may define their own efficiency function and pass in that function with the keyword argument "efficiency_function", which will sidestep the required calibration_coeffs argument and use the provided function to evaluate detector efficiency instead. This setup also ensures that all repos that still use the calibration_coeffs will still work.